import { UserReqUrl } from '@/helpers/constants/api/user'
import type { HttpResponseData } from '@/types/api'
import type { APIGetUserInfoReqData, APIUserInfo } from '@/types/api/user'
import request from '@/utils/request'
import { jsonToFormData } from '@/utils/utils'

// 查询用户信息
export function getUserInfo(params: APIGetUserInfoReqData): Promise<HttpResponseData<APIUserInfo>> {
  return request.post<APIUserInfo>(UserReqUrl.GetUserInfo, jsonToFormData(params))
}
